home *** CD-ROM | disk | FTP | other *** search
/ NCSoft Asset Disc (USA) / NCSoft Asset Disc (USA).bin / nc_nav.swf / scripts / frame_55 / DoAction.as
Encoding:
Text File  |  2003-05-03  |  1.5 KB  |  79 lines

  1. function Moveitem(num)
  2. {
  3.    _root["item" + num].targetPlay(30);
  4.    if(num != _root.menucheck)
  5.    {
  6.       _root["item" + _root.menucheck].gotoAndStop(30);
  7.       _root["item" + _root.menucheck].targetPlay(35);
  8.    }
  9.    i = 1;
  10.    while(i <= 5)
  11.    {
  12.       if(i == num)
  13.       {
  14.          _root["item" + i].line.gotoAndPlay(2);
  15.       }
  16.       else
  17.       {
  18.          _root["item" + i].line.gotoAndStop(1);
  19.       }
  20.       i++;
  21.    }
  22.    _root.menucheck = num;
  23. }
  24. function menuSelect(num, sub)
  25. {
  26.    switch(num)
  27.    {
  28.       case 1:
  29.          menu = "overview";
  30.          break;
  31.       case 2:
  32.          menu = "history";
  33.          break;
  34.       case 3:
  35.          menu = "ceo";
  36.          break;
  37.       case 4:
  38.          menu = "financial";
  39.          break;
  40.       case 5:
  41.          menu = "global";
  42.    }
  43.    if(menu == _level0.check_NcMenu)
  44.    {
  45.       _level300.gotoAndPlay("start");
  46.    }
  47.    else
  48.    {
  49.       loadCommandEX(menu);
  50.    }
  51.    if(num == 5)
  52.    {
  53.       _level0.startMovie = sub;
  54.    }
  55.    _level0.check_NcMenu = menu;
  56. }
  57. i = 1;
  58. while(i <= 5)
  59. {
  60.    _root["item" + i].firstY = _root["item" + i]._y;
  61.    _root["item" + i].box.i = i;
  62.    _root["item" + i].i = i;
  63.    _root["item" + i].box.onRollOver = function()
  64.    {
  65.    };
  66.    _root["item" + i].box.onRollOut = function()
  67.    {
  68.    };
  69.    _root["item" + i].box.onRelease = function()
  70.    {
  71.       _root.Moveitem(this.i);
  72.       if(this.i != 5)
  73.       {
  74.          _root.menuSelect(this.i);
  75.       }
  76.    };
  77.    i++;
  78. }
  79.